
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link href="/style/basic_layout.css" rel="stylesheet" type="text/css">
    <link href="/style/common_style.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="/js/jquery/jquery.js"></script>
    <script type="text/javascript" src="/js/plugins/artDialog/jquery.artDialog.js?skin=blue"></script>
    <script type="text/javascript" src="/js/plugins/My97DatePicker/WdatePicker.js"></script>
    <script type="text/javascript" src="/js/commonAll.js"></script>
    <script>


        //使用类选择将所有设置时间的添加日历选择效果
        //最大时间
        $(function () {
            //点击审核按钮,发送审核请求
            //订单审核
            $(".btn_audit").click(function () {
                var url = $(this).data("url");
                showAlog("确定要审核吗?",function () {
                    //发送ajax请求到服务器完成功能的业务
                    $.get(url,function (data) {
                        if (data.success) {
                            showAlog("操作成功!",function () {
                                location.reload();
                            }
                            );
                        }
                        else{
                            showAlog(data.msg)
                        }
                    });
                },true);
            });


            $(".wdate[name='beginDate']").click(function () {
                WdatePicker({
                    readOnly:true,
                    maxDate:new Date(),

                     //minDate:
                })
            })

            $(".wdate[name='endDate']").click(function () {
                WdatePicker({
                    readOnly:true,
                    maxDate:new Date(),
                    //最细时间是begin的值
                    minDate:$("input[name='beginDate']").val()
                })
            })
            //最小时间
        })
    </script>
    <title>WMS-演示版</title>
    <style>
        .alt td{ background:black !important;}
    </style>

</head>
<body>

<form id="searchForm" action="/chart/order.do" method="post">
    <div id="container">
        <div class="ui_content">
            <div class="ui_text_indent">
                <div id="box_bstockIncome">
                    <div id="box_top">搜索</div>
                    <div id="box_center">
                        业务时间
                        <input type="text" class="ui_input_txt02 Wdate" name="beginDate" value='<fmt:formatDate value="${qo.beginDate}"/>' />~
                        <input type="text" class="ui_input_txt02 Wdate" name="endDate" value='<fmt:formatDate value="${qo.endDate}" />' />
                        货品名称/编码
                        <input type="text" class="ui_input_txt02" name="keyword" value="${qo.keyword}" />
                        供应商
                        <select class="ui_select01 btn_dept" name="supplierId">
                            <option value=-1>---请选择---</option>
                            <c:forEach items="${suppliers}" var="d">

                                <option value=${d.id}>${d.name}</option>
                            </c:forEach>
                            <script>$("select[name='supplierId'] option[value=${qo.supplierId}]").prop("selected",true)</script>
                        </select>

                        品牌
                        <select class="ui_select01 btn_dept" name="brandId">
                            <option value=-1>---请选择---</option>
                            <c:forEach items="${brands}" var="d">

                                <option value=${d.id}>${d.name}</option>
                            </c:forEach>
                            <script>$("select[name='brandId'] option[value=${qo.brandId}]").prop("selected",true)</script>
                        </select>
                        类型
                        <select class="ui_select01 btn_dept" name="groupType">

                            <c:forEach items="${orders}" var="d">

                                <option value=${d.key}>${d.value}</option>
                            </c:forEach>
                            <script>$("select[name='groupType'] option[value=\"${qo.groupType}\"]").prop("selected",true)</script>
                        </select>
                        <script>$(".btn_dept").change(function () {
                            $("#searchForm").submit()
                        })</script>


                    </div>
                    <div id="box_bottom">
                        <input type="button" value="查询" class="ui_input_btn01 btn_page" data-page="1"/>

                    </div>
                </div>
            </div>
        </div>
        <div class="ui_content">
            <div class="ui_tb">
                <table class="table" cellspacing="0" cellpadding="0" width="100%" align="center" bstockIncome="0">
                    <tr>

                        <th>分组类型</th>
                        <th>订货总数</th>
                        <th>订货总额</th>

                    </tr>
                <c:forEach items="${list}" var="entity" varStatus="num">
                    <tr>

                        <td>${entity.groupType}</td>
                        <td>${entity.totalNumber}</td>
                        <td>${entity.totalAmount}</td>


                    </tr>
                </c:forEach>
                </table>
            </div>
            <div class="ui_tb_h30">
                <div class="ui_flt" style="height: 30px; line-height: 30px;">

                </div>
            </div>
        </div>
    </div>
</form>
</body>
</html>

